package com.lianzhihui.romeex.mvp.presenter;

import android.content.Context;

import com.lianzhihui.romeex.bean.SunTeamAwardBean;
import com.lianzhihui.romeex.bean.user.CountryCode;
import com.lianzhihui.romeex.bean.user.WalletInfo;
import com.lianzhihui.romeex.mvp.model.EarningsModelImp;
import com.lianzhihui.romeex.mvp.model.EarningsModelInterface;
import com.lianzhihui.romeex.mvp.model.LoginModelImp;
import com.lianzhihui.romeex.mvp.model.LoginModelInterface;
import com.lianzhihui.romeex.mvp.view.EarningsView;
import com.lianzhihui.romeex.mvp.view.LoginView;

import java.util.List;

//逻辑实现
public class EarningsPresnterImp implements EarningsModelInterface {

    private final EarningsView loginView;
    private final EarningsModelImp earningsModelImp;

    public EarningsPresnterImp(Context context, EarningsView loginView) {
        this.loginView = loginView;
        earningsModelImp = new EarningsModelImp(context, this);
    }

    public void requestSunTeamAward(int page, int pageSize) {
        earningsModelImp.requestSunTeamAward(page, pageSize);
    }

    @Override
    public void onFailure() {
        loginView.setFailure();
    }

    @Override
    public void responseSunTeamAwardSuccess(SunTeamAwardBean bean) {
        loginView.responseSunTeamAwardSuccess(bean);
    }
}
